﻿/// <reference name="MicrosoftAjax.js"/>
/// <reference name="Dimok.Web.UI.JS.JQuery.VSDoc.js" assembly="Dimok.Web.UI" />
/// <reference name="Dimok.Web.UI.JS.MSAjaxExtentions.js" assembly="Dimok.Web.UI" />
/// <reference path="../../Manager/Admin/Admin.asmx" />
/// <reference path="../../JS/UI/Dimok.Table.js" />
Type.registerNamespace("motobankcorp");
motobankcorp.TruthInLendings = function(element) {
  motobankcorp.TruthInLendings.initializeBase(this, [element]);
  Dimok.AccessorizeType(this);
}
motobankcorp.TruthInLendings.prototype = {
  initialize: function() {
    motobankcorp.TruthInLendings.callBaseMethod(this, 'initialize');
    Sys.Application.add_load(Function.createDelegate(this, function() {
      Dimok.FindPageEvents().add_purchaseBatchesDeselected(Function.createDelegate(this, function() {
        this.get_RGE().set_filterTemp();
      }));
      Dimok.FindPageEvents().add_purchaseBatchesSelected(Function.createDelegate(this, function(sender, eventArgs) {
        this.get_RGE().set_filterTemp("PurchaseBatchID", eventArgs.get_keys().get_ID());
      }));
      this.get_RGE().add_rowDeselected(function(sender, eventArgs) {
        sender.findPageEventsGlobal().raise_loanDeselected(eventArgs);
      });
      this.get_RGE().add_rowSelected(function(sender, eventArgs) {
        sender.findPageEventsGlobal().raise_loanSelected(eventArgs);
      });
      this.get_RGE().add_rowDeleted(Function.createDelegate(this, function(sender, eventArgs) {
        Dimok.FindPageEvents().raise_loanDeleted(eventArgs);
      }));
      this.get_RGE().add_rowBatchDeleted(Function.createDelegate(this, function(sender, eventArgs) {
        Dimok.FindPageEvents().raise_loanBatchDeleted(eventArgs);
      }));
    }));
  },
  dispose: function() {
    motobankcorp.TruthInLendings.callBaseMethod(this, 'dispose');
  }
}
motobankcorp.TruthInLendings.registerClass('motobankcorp.TruthInLendings', motobankcorp.Loans);
